<style media="screen">
  .tab-view{
    padding:1%;
  }
</style>
<style media="screen">
.masthead.segment {
  min-height: auto;
  padding: 1em 0em;
}
</style>

<div class="ui divider">

</div>
<div class="ui centered container" style="text-align:center;">
    <div class="ui top attached tabular menu">
      <a class="active item" data-tab="first">汽车</a>
      <a class="item" data-tab="second">车险</a>
      <a class="item" data-tab="third">车品</a>
    </div>
    <div class="ui bottom attached active tab tab-view" data-tab="first">
      <div class="ui link centered cards" style="text-align: center">

        <% @products.each do |product| %>
          <div class="card">
            <a  href="/products/<%= product.id %>" class="image">
              <img src="<%= Picture.find(product.cover).image.url %>">
            </a>
            <div class="content">
              <div class="header"><%= product.car.model_type %></div>
              <div class="meta">
                <a><%= product.brand %></a>
              </div>
              <div class="description">
                <p>新手指导价：<span style="color:red;font-weight:bolder"><%=product.car.price_about_general_lowest %>~<%=product.car.price_about_general_highest %>万</span></p>
                <p>滴滴车主俱乐部价：<span style="color:red;font-weight:bolder"><%=product.car.price_about_didi_lowest %>~<%=product.car.price_about_didi_highest %>万</span></p>
              </div>
            </div>
            <div class="extra content">
              <div class="ui two buttons">
               
                <%=link_to "分享", url(:share, :index, :id=> get_current_node, :product_id => product.id, :timestamp => Time.now.to_i ), :class => "ui basic green button" %>
                <a href="/order/intend_to_buy/<%= product.id %>" class="ui basic red button">意向购买</a>
              </div>
            </div>
          </div>
        <%  end %>

      </div>

    </div>
    <div class="ui bottom attached tab tab-view " data-tab="second">
      敬请期待
    </div>
    <div class="ui bottom attached tab tab-view" data-tab="third">
      敬请期待
    </div>
    <script type="text/javascript">
    $('.menu .item')
      .tab()
    ;
    </script>


</div>
